/*
 Navicat Premium Data Transfer

 Source Server         : demo
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : localhost:3306
 Source Schema         : demo

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 10/04/2022 20:05:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_po
-- ----------------------------
DROP TABLE IF EXISTS `t_po`;
CREATE TABLE `t_po` (
  `id` int(11) DEFAULT NULL,
  `code` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '权限码',
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '权限名称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_po
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for t_role
-- ----------------------------
DROP TABLE IF EXISTS `t_role`;
CREATE TABLE `t_role` (
  `id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `code` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_role
-- ----------------------------
BEGIN;
INSERT INTO `t_role` VALUES (1, '管理员', 'admin');
INSERT INTO `t_role` VALUES (2, ' 普通用户', 'normal');
COMMIT;

-- ----------------------------
-- Table structure for t_role_po
-- ----------------------------
DROP TABLE IF EXISTS `t_role_po`;
CREATE TABLE `t_role_po` (
  `id` int(12) NOT NULL,
  `role_id` int(12) DEFAULT NULL,
  `po_id` int(12) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_role_po
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for t_role_user
-- ----------------------------
DROP TABLE IF EXISTS `t_role_user`;
CREATE TABLE `t_role_user` (
  `id` int(12) NOT NULL,
  `role_id` int(12) DEFAULT NULL,
  `user_id` int(12) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_role_user
-- ----------------------------
BEGIN;
INSERT INTO `t_role_user` VALUES (1, 1, 1);
INSERT INTO `t_role_user` VALUES (2, 2, 2);
COMMIT;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
  `id` int(11) NOT NULL,
  `account` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `pwd` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_user
-- ----------------------------
BEGIN;
INSERT INTO `t_user` VALUES (1, 'admin', '123456');
INSERT INTO `t_user` VALUES (2, 'normal', '123456');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
